package cate.common.table.guild;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import easy.java.dev.note.NoteField;

public class GuildGradeRow extends ERow {
    @NoteField(value = "升级所需经验")
    public int requireExp;
    @NoteField(value = "副会长数量")
    public int viceNum;
    @NoteField(value = "长老数量")
    public int presbyterNum;
    @NoteField(value = "成员上限")
    public int memberLimit;
    @NoteField(value = "属性加成")
    public String attrStr;
    @NoteField(value = "活跃度上限")
    public int activeMax;

    @Override
    public void parse(XSSFRowWrap xrw) {
        try {
            super.parse(xrw);
            id = xrw.getInteger("公会等级", 0);
            requireExp = xrw.getInteger("升级需要经验", 1000);
            viceNum = xrw.getInteger("副会长数量", 2);
            presbyterNum = xrw.getInteger("长老数量", 0);
            memberLimit = xrw.getInteger("成员上限", 2);
            attrStr = xrw.getString("属性加成", "");
            activeMax = xrw.getInteger("活跃度上限", 0);
        } catch (Exception e) {
            getContext().shutdown(1, "公会等级表解析异常，必须修复该问题后才允许启动服务器", e);
        }
    }
}
